package behavior.interpreter.ExpressionParse;

import org.springframework.expression.Expression;
import org.springframework.expression.ExpressionParser;
import org.springframework.expression.spel.standard.SpelExpressionParser;

public class Demo {


    public static void main(String[] args) {
        // spring 表达式解析器
        ExpressionParser parser = new SpelExpressionParser();
        Expression expression = parser.parseExpression("10*5+8*(19+2)/6");
        Integer value = (Integer) expression.getValue();
        System.out.println(value);

    }
}
